﻿@model PagedList.IPagedList<WebDKMH.Models.giaovien>
@using PagedList.Mvc;
@{
    ViewBag.Title = "dsgv";
    Layout = "~/Views/Shared/admin.cshtml";
}
<link href="~/Content/PagedList.css" rel="stylesheet" />
@*<div class="Content-midle-Top-Ten"><h4> ► Danh Sách GV</h4></div>*@
<div class="Main-Content-1">
    <div class="Main-Content-1-Tieude">
        <img src="~/Images/icon_dangky.png" />
        <ul>
            <li>
                <h2>DANH SÁCH GV</h2>
            </li>
        </ul>
    </div>
    <div class="Main-Content-1-Noidung">
        <p></p>
        <div style="margin-left:7px">
            <form action="@Url.Action("dsgv", "Admin")" method="get">
                <input id="search" name="search" type="text" value="@ViewBag.Search" />
                <input type="submit" value="Tìm kiếm" />
            </form>

        </div>
        
        <p></p>
        <table border="1" cellspacing="0" style="border: 1px groove #0976f5; width: 750px; margin: auto; ">
            <tr style=" color: #ffffff; background: #4395f5;">
                <th style="width:50px;">STT </th>
                <th style="width:80px;">Mã Giáo Viên</th>
                <th style="width:150px;">Họ Tên</th>
                <th style="width:80px;">GVC</th>
                <th style="width:50px;">Sửa</th>
                <th style="width:50px;">Xóa</th>
            </tr>
            @{
                int xp = 0;
                if (Request.QueryString["page"] == null)
                {
                    xp = 1;
                }
                else
                {
                    xp = Convert.ToInt16(Request.QueryString["page"]);
                }

                int i = (xp - 1) * 100 + 1;

            }
            @foreach (var item in Model)
            {

                <tr style="color: #0c1574; border-collapse: collapse;">
                    <td style="padding-left:20px">@i</td>
                    <td style="padding-left:5px">@Html.DisplayFor(modelItem => item.magv)</td>
                    <td style="padding-left:5px">@Html.DisplayFor(modelItem => item.hotengv) </td>
                    <td style="padding-left:5px">@Html.DisplayFor(modelItem => item.gvc)</td>
                    <td>@Html.ActionLink("Chỉnh sửa", "suagv", new { magv = item.magv }) </td>
                    <td>@Html.ActionLink("Xóa", "xoagv", new { magv = item.magv }) </td>
                </tr>
                i = i + 1;
            }

        </table>
        <a href=@Url.Action("themgv","admin")>
            <input style=" width: 80px; height: 30px; float: left;margin-left :150px;   margin-top: 20px;" id="OK" type="submit" value="Thêm" />
        </a>
        <input style=" width: 80px; height: 30px; float: left; margin-left: 150px; margin-top: 20px;" id="IN" type="submit" value="In Ra" />
        <input style=" width: 80px; height: 30px; float: left; margin-left: 41px; margin-top: 20px;" id="Xuat" type="reset" value="Xuất Flie" />
    </div>
    Page @(Model.PageCount < Model.PageNumber ? 0 : Model.PageNumber) of @Model.PageCount
    @Html.PagedListPager(Model, page => Url.Action("dsgv", new { page, sortOrder = ViewBag.CurrentSort, currentFilter = ViewBag.CurrentFilter }))
</div>
   
